﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:models="clr-namespace:ZFCNew.ViewModels"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" mc:Ignorable="d"
	x:Class="ZFCNew.Views.TwitterSearch"
	UseLayoutRounding="True"
	Width="Auto" Height="Auto">
	<UserControl.Resources>
        <models:TwitterSearchModel x:Key="TwitterSearchModelDataSource" />
		
    </UserControl.Resources>

	<Border Width="750" Height="595" BorderThickness="4">

        <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource TwitterSearchModelDataSource}}">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="Click" SourceObject="{Binding ElementName=NextBtn}">
                    <i:InvokeCommandAction Command="{Binding GetNextResultSetCommand}"/>
                </i:EventTrigger>
                <i:EventTrigger EventName="Click" SourceObject="{Binding ElementName=PrevBtn}">
                    <i:InvokeCommandAction Command="{Binding GetPreviousResultSetCommand}"/>
                </i:EventTrigger>
                <i:EventTrigger EventName="Click" SourceObject="{Binding ElementName=SearchBtn}">
                    <i:InvokeCommandAction Command="{Binding GeneralSearchCommand}" CommandParameter="{Binding ElementName=SearchTB,Path=Text}"/>
                </i:EventTrigger>
                
            </i:Interaction.Triggers>
            <ItemsControl ItemTemplate="{StaticResource ZakumiListBoxItemDataTemplate}" ItemsSource="{Binding CurrentResult}" Background="{x:Null}" BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Margin="30,63,0,20" Visibility="{Binding IsChecked, Converter={StaticResource VisibilityConverter}, ElementName=radioButton}"/>
			<Button x:Name="NextBtn" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="61" Margin="0,0,200,-6" Style="{StaticResource NextPrevButtonStyle}" Height="29" Background="#FFFFC700" />
            <Button x:Name="PrevBtn" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="61" Margin="200,0,0,-6" Style="{StaticResource NextPrevButtonStyle}" Height="29" RenderTransformOrigin="0.5,0.5" Background="#FFFFC700" >
				<Button.RenderTransform>
					<CompositeTransform ScaleX="-1"/>
				</Button.RenderTransform>
			</Button>
            <TextBox x:Name="SearchTB" Style="{StaticResource SearchTBStyle}" HorizontalAlignment="Right" TextWrapping="Wrap" Text="Zakumi" VerticalAlignment="Top" FontSize="16" Width="250" Margin="0,25,60,0" Background="{x:Null}" BorderBrush="#FFFFC700" CaretBrush="Red" Foreground="#FFDCD2D2"/>
            <Button x:Name="SearchBtn" HorizontalAlignment="Right" VerticalAlignment="Top" Width="32" Margin="0,25,29,0" Height="32" Background="#FF020202" Style="{StaticResource SearchBtnStyle}" BorderBrush="#FFFFC700"/>
            <TextBlock TextWrapping="Wrap" Text="Search twitter" VerticalAlignment="Top" Foreground="#FF555555" FontSize="24" FontFamily="Franklin Gothic Heavy" Margin="263,28,0,0" HorizontalAlignment="Left"/>
        </Grid>
	</Border>
</UserControl>